<template>
  <header class="app-header">
    <div class="header-container">
      <div class="header-left">
        <div class="logo">
          <span class="logo-icon">🔗</span>
          <h1 class="logo-text">级联选择器表格联动</h1>
        </div>
        <div class="subtitle">
          Vue3 + TypeScript 完整实现
        </div>
      </div>
      
      <div class="header-right">
        <div class="info-badges">
          <div class="badge">
            <span class="badge-icon">⚡</span>
            <span class="badge-text">Vue 3</span>
          </div>
          <div class="badge">
            <span class="badge-icon">🔷</span>
            <span class="badge-text">TypeScript</span>
          </div>
          <div class="badge">
            <span class="badge-icon">🎯</span>
            <span class="badge-text">Composition API</span>
          </div>
        </div>
        
        <div class="version">
          v2.0.0
        </div>
      </div>
    </div>
    
    <div class="header-description">
      <p>
        演示如何将级联选择器的选中值（最深层级）传递给父组件，并作为表格数据的请求参数。
        支持任意层级选择、实时数据更新、完整的 TypeScript 类型支持。
      </p>
    </div>
  </header>
</template>

<script setup lang="ts">
// 这个组件不需要任何逻辑，纯展示组件
</script>

<style scoped>
.app-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="20" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="70" r="2" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
  pointer-events: none;
}

.header-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.header-left {
  flex: 1;
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 2.5rem;
  margin-right: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-text {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.info-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-icon {
  font-size: 1rem;
}

.badge-text {
  white-space: nowrap;
}

.version {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-description {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.header-description p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .app-header {
    padding: 20px 16px;
  }
  
  .header-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .header-right {
    align-items: flex-start;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .info-badges {
    justify-content: flex-start;
  }
  
  .header-description p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.3rem;
  }
  
  .logo-icon {
    font-size: 2rem;
  }
  
  .info-badges {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .badge {
    font-size: 0.8rem;
  }
}
</style>
